package com.shf4;

public class ThreadJoinDemo {
  public static void main(String[] args) {
    ThreadJoin tj1=new ThreadJoin();
    ThreadJoin tj2=new ThreadJoin();
    ThreadJoin tj3=new ThreadJoin();

    tj1.setName("康熙");
    tj2.setName("四阿哥");
    tj3.setName("八阿哥");

    tj1.start();
    try {
      tj1.join(); // 等待这个线程死亡
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    tj2.start();
    tj3.start();
  }
}
